const router = require('koa-router')()
const Mock = require('mockjs')
const data = Mock.mock({
  "list|5": [{
    "id": "@id",
    "image": "@image(120x120, @color)",
    "title": "@ctitle",
    "price|1-100": 1,
    "count|1-10": 1,
    "max|10-20": 1,
    "desc": "@cword(10, 20)" ,
    "check": "@boolean"
  }]
})
router.get('/car', async (ctx) => {
  ctx.body = {
    code: 200,
    data: data.list
  } 
})

module.exports = router
